package com.atguigu.mycloud;

import com.atguigu.mycloud.Enum.ReturnMessage;
import com.atguigu.mycloud.entities.Order;
import com.atguigu.mycloud.service.OrderService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 任浩
 * @version 1.0
 */

@RestController
public class controller {
    @Resource
    private OrderService orderService;

    /**
     * 创建订单
     * @param order
     * @return
     */
    @GetMapping("/order/create")
    public ReturnMessage create(Order order){
        ReturnMessage returnMessage = orderService.create(order);
        return returnMessage;
    }
}
